Previous Book Contents Book Index Next

Inside Macintosh: Mac OS 8 Toolbox Reference /
Chapter 2 - Control Manager Reference / Control Manager Functions
Accessing and Changing Control Settings and Data /


SetControlAction

CHANGED WITH THE APPEARANCE MANAGER

Sets or changes the action function for the specified control's control structure.

pascal void SetControlAction (
                     ControlHandle theControl,
                     ControlActionUPP actionProc);
theControl
On input, a handle to the control whose action function you wish to change.
actionProc
On input, a pointer to an action function defining what action your application takes while the user holds down the mouse button.
DISCUSSION
The SetControlAction function changes the contrlAction field of the control structure to point to the action function specified in the actionProc parameter. If the cursor is in the specified control, HandleControlClick or TrackControl call this action function when the user holds down the mouse button. You must provide the action function, and it must define some action to perform repeatedly as long as the user holds down the mouse button. HandleControlUnderClick and TrackControl always highlight and drag the control as appropriate.

Note
SetControlAction should be used to set the application-defined action function for providing live feedback for standard system scroll bar controls.
SEE ALSO
MyActionProc.

WHEN THE APPEARANCE MANAGER IS NOT AVAILABLE
Live feedback is not supported.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
8 JAN 1998